﻿using System.Collections.Generic;

namespace K9Nano.Application
{
    public class PagedResultDto<TItem>
    {
        public int Total { get; }

        public IReadOnlyList<TItem> Items { get; }

        public PagedResultDto()
        {
            
        }

        public PagedResultDto(int total, List<TItem> items)
        {
            Total = total;
            Items = items;
        }

        public PagedResultDto(int total, IReadOnlyList<TItem> items)
        {
            Total = total;
            Items = items;
        }

        public PagedResultDto(int total, IEnumerable<TItem> items)
        {
            Total = total;
            Items = new List<TItem>(items);
        }
    }
}